#ifndef _HCI_DRIVER_H
#define _HCI_DRIVER_H

#if defined (__cplusplus)
extern "C" {
#endif

#ifndef UNDER_CE

typedef enum
{
	HCI_TYPE_BCCMD,
	HCI_TYPE_ACL,
	HCI_TYPE_SCO,
	HCI_TYPE_HCI,
} HciTypeT;

typedef void (*HCI_TransportCallback) ();

DWORD	HCI_StartHardware (void);
DWORD	HCI_StopHardware (void);
DWORD	HCI_SetCallback (HCI_TransportCallback callback);
DWORD	HCI_OpenConnection (TCHAR* name);
DWORD	HCI_CloseConnection (void);

#endif

DWORD	HCI_ReadPacket2 (BcspChannelT* channel, unsigned char** buffer, DWORD* size);
DWORD	HCI_WritePacket2 (BcspChannelT channel, unsigned char* buffer, DWORD size);
int		HCI_OpenConnection2 (const TCHAR* registryPath);

typedef DWORD (*HCI_StartHardwareT) (void);
typedef DWORD (*HCI_StopHardwareT) (void);
typedef DWORD (*HCI_SetCallbackT) (HCI_TransportCallback callback);
typedef DWORD (*HCI_OpenConnectionT) (TCHAR* name);
typedef DWORD (*HCI_CloseConnectionT) (void);
typedef DWORD (*HCI_ReadPacketT) (BcspChannelT* channel, unsigned char** buffer, DWORD* size);
typedef DWORD (*HCI_WritePacketT) (BcspChannelT channel, unsigned char* buffer, DWORD size);

typedef struct
{
	HCI_StartHardwareT		hciStartHardware;
	HCI_StopHardwareT		hciStopHardware;
	HCI_SetCallbackT		hciSetCallback;
	HCI_OpenConnectionT		hciOpenConnection;
	HCI_CloseConnectionT	hciCloseConnection;
	HCI_ReadPacketT			hciReadPacket;
	HCI_WritePacketT		hciWritePacket;
} HciInterfaceT;

#ifdef __cplusplus
}
#endif

#endif